package com.zqg8512.netty.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @Author zengqianggang
 * @Description //TODO
 * Author VPN
 * @Date 2019/9/30 14:59
 * @Version 1.0
 **/
@Controller
public class PageController {

    @Autowired
    SnowFlake sf;

    @RequestMapping(value = "/")
    public String index(Map<String, Object> map){
        map.put("userId", sf.nextId());
        return "index";
    }

    @RequestMapping(value = "page/{pag}")
    public String page(@PathVariable String pag){
        return pag;
    }
}
